<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib prefix="c" uri="/WEB-INF/tld/c.tld" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><strong>修改公告</strong></title>
<link href="/estate/css/css.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/estate/js/lhgcore.js"></script>
<script type="text/javascript" src="/estate/js/lhgcalendar.js"></script>
<script type="text/javascript">
	function save(form){
		form.action="/estate/admin/announcementAction.action?method=update&state=1";

   		form.submit();
	}
	function post(form){
		form.action="/estate/admin/announcementAction.action?method=update&state=2";

   		form.submit();
	}
</script>
</head>
<body>
<form name="form1" id="form1" method="post" action="">
<table border="0" cellpadding="0" cellspacing="0" style="background-image:url(/estate/images/gtbg.gif) " width="100%">
    <tr>
      <td width="50%" height="82" rowspan="2"><img src="/estate/images/guide_01.gif"></td>
      <td width="50%" style="background-image:url(/estate/images/guide_02.gif);color:#cc1212; font-size:16px; font-weight:bold; text-align:right; padding-right:50px; letter-spacing:1px; " height="39"><strong>公告管理</strong></td>
    </tr>
     <tr><td width="50%" style="background-image:url(/estate/images/guide_03.gif); height:43px;" align="center" valign="middle">
	  <table width="50%" border="0" cellspacing="0" cellpadding="0">
        <tr align="center">
        </tr>
      </table></td>
    </tr>
</table><br>
<table width="60%" align="center" border="0" cellspacing="0" cellpadding="0" class="main">
	<input type="hidden" name="id" value="${announcement.id }"/>
  <tr align="center">
    <td colspan="4" class="tableTitle">修改公司公告信息</td>
  </tr>
  <tr>
    <td width="15%" align="right" class="two" >标题：</td>
    <td width="33%" class="two" align="left">&nbsp;<input type="text" name="title" class="input" value="${announcement.title }"/></td>
  </tr>
  
  <tr>
    <td align="right" class="two">内容：</td>
    <td class="two" align="left">&nbsp;
    	<textarea type="textarea" name="content" style=" width:90% "  class="textaremain">${announcement.content }</textarea>
    </td>
  </tr>
  
   <tr>
  	<td colspan="2" class="two" align="center">
  		<c:if test="${announcement.state eq '已发布' }">
  			<input type="button" name="Submit1" onFocus="this.blur();" value="提交修改" class="button2" onclick="post(form1)">
  		</c:if>
  		<c:if test="${announcement.state eq '未发布' }">
	  		<input type="button" name="Submit1" onFocus="this.blur();" value="保存" class="button2" onclick="save(form1)">
	  		<input type="button" name="Submit2" onFocus="this.blur();" value="发布" class="button2" onclick="post(form1)">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	  		<input type="reset" name="Submit3" onFocus="this.blur();" value="重置" class="button2"> 
  		</c:if>
  	</td>
  </tr>
 
  <tr><td class="two" colspan="2">&nbsp;</td></tr>
</table><br>
</form>
</body>
</html>
